package com.yt.ootest.Observer.CrudeOilFutures;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by Administrator on 2019/2/7 23:10
 */
public class Bull implements Observer {
    @Override
    public void update(Observable o, Object arg) {

            Float price=((Float)arg).floatValue();
            if(price>0)
            {
                System.out.println("油价上涨"+price+"元，多方高兴了！");
            }
            else
            {
                System.out.println("油价下跌"+(-price)+"元，多方伤心了！");
            }

    }
}
